package com.jhgsys.internal.sypq.service;

import com.jhgsys.internal.sypq.entity.Customer;
import com.jhgsys.internal.common.entity.QueryRequest;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 客户信息 Service接口
 *
 * @author ganjun
 * @date 2024-11-12 14:15:30
 */
public interface ICustomerService extends IService<Customer> {
    /**
     * 查询（分页）
     * @author ganjun
     * @date 2024-11-12 14:15:30
     * @param request QueryRequest
     * @return IPage<Customer>
     */
    IPage<Customer> findCustomerPage(QueryRequest request, String nameSearch, String contactSearch, String statusSearch, String userName);

    /**
     * 查询（所有）
     * @author ganjun
     * @date 2024-11-12 14:15:30
     * @param customer customer
     * @return List<Customer>
     */
    List<Customer> findCustomerList(Customer customer);

    /**
    * 根据ID查询
    * @author ganjun
    * @date 2024-11-12 14:15:30
    * @param id
    * @return Customer
    */
    Customer findCustomerById(String id);

    /**
     * 新增
     * @author ganjun
     * @date 2024-11-12 14:15:30
     * @param customer customer
     */
    boolean createCustomer(Customer customer);

    /**
     * 修改
     * @author ganjun
     * @date 2024-11-12 14:15:30
     * @param customer customer
     */
    boolean updateCustomer(Customer customer);

    /**
     * 审核
     * @author ganjun
     * @date 2024-11-12 14:15:30
     * @param customer customer
     */
    boolean auditCustomer(Customer customer);

    /**
     * 逻辑删除
     * @author ganjun
     * @date 2024-11-12 14:15:30
     * @param customer customer
     * @param customerIds customerIds
     */
    boolean deleteCustomer(Customer customer, String customerIds);

    /**
    * 物理删除
    * @author ganjun
    * @date 2024-11-12 14:15:30
    * @param customerIds customerIds
    */
    boolean physicallyDeleteCustomer(String customerIds);
}
